package logic.util;

import java.text.SimpleDateFormat;
import java.util.Date;


/** 倒计时long类型转换成还有??天??:??:??（时分秒）的格式 */
public class TimerUtil
{
	public static String getTime(long millisUntilFinished) {
		long day = millisUntilFinished / 1000 / 60 / 60 / 24;
		millisUntilFinished %= (1000 * 60 * 60 * 24);
		SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
		String time = sdf.format(new Date(millisUntilFinished));
		if (day > 0)
		{
			return day + "天" + time;
		}
		else
		{
			return time;
		}
	}
}
